<template>
  <!--审核信息 -->
  <div style="height:520px">
    <FormPanel
      ref="infoOpinion"
      :list="initForm"
      :cols="3"
      :formType="value.type"
      :isSubmitBtn="false"
      @formChange="formChangeHandle"
    />
  </div>
</template>

<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  mixins: [dictionary],
  props: {
    value: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      initForm: this.initFormFun(),
      formValue: {}
    };
  },
  mounted() {
    console.log(this.value); //获取到行id 、类型（新增、详情）
    //请求接口进行赋值，自己写吧
  },
  methods: {
    //初始化数据
    init(data) {
      this.formValue = {};
      // if (data.type === 'edit') {
      //   this.initForm.forEach(x => {
      //     x.initialValue = data.row[x.fieldName];
      //   });
      // }
    },
    //搜索数据
    initFormFun() {
      return [
        {
          type: 'TEXT_AREA',
          label: '审核意见',
          rows:4,
          maxlength:100,
          fieldName: 'field9',
          initialValue: ''
        }
      ];
    },
    formChangeHandle(val) {
      this.formValue = val;
    }
  }
};
</script>